package com.yjz.demo

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.widget.AppCompatButton
import com.yjz.common.base.BaseActivity
import com.yjz.demo.banner.BannerDemoActivity
import com.yjz.demo.log.JLogDemoActivity
import com.yjz.demo.router.RouterDemoActivity
import com.yjz.demo.tab.BottomTabLayoutActivity
import com.yjz.demo.tab.TopTabLayoutActivity
import com.yjz.demo.thread.CustomThreadPoolActivity

/**
 *作用 : 框架功能使用演示
 *作者 : yjz
 *时间 : 2025/2/13 14:14
 */
class DemoMainActivity : BaseActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_demo_main)
        findViewById<AppCompatButton>(R.id.log).setOnClickListener {
            startActivity(Intent(this@DemoMainActivity, JLogDemoActivity::class.java))
        }
        findViewById<AppCompatButton>(R.id.bottom_tab).setOnClickListener {
            startActivity(Intent(this@DemoMainActivity, BottomTabLayoutActivity::class.java))
        }
        findViewById<AppCompatButton>(R.id.top_tab).setOnClickListener {
            startActivity(Intent(this@DemoMainActivity, TopTabLayoutActivity::class.java))
        }
        findViewById<AppCompatButton>(R.id.banner).setOnClickListener {
            startActivity(Intent(this@DemoMainActivity, BannerDemoActivity::class.java))
        }
        findViewById<AppCompatButton>(R.id.router).setOnClickListener {
            startActivity(Intent(this@DemoMainActivity, RouterDemoActivity::class.java))
        }
        findViewById<AppCompatButton>(R.id.thread).setOnClickListener {
            startActivity(Intent(this@DemoMainActivity, CustomThreadPoolActivity::class.java))
        }
    }
}